package com.example.demo.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.demo.entity.Role;
import com.example.demo.service.RoleService;
import com.example.demo.service.RoleTestService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author hej
 * @since 2022-11-03
 */
@RestController
@RequestMapping("/role")
public class RoleController {
    @Resource
    private RoleService roleService;
    @Resource
    private RoleTestService roleTestService;

    @PostMapping("/queryList")
    public List<Role> queryList(){
        List list = new ArrayList();
        new Role().selectList(null);
        list.addAll(roleService.getBaseMapper().selectList(null));
        list.addAll(roleTestService.getBaseMapper().selectList(null));
        return list;
    }
}
